package com.gyz.cfmall.feign;

import com.gyz.cfmall.vo.SocialUser;
import com.gyz.cfmall.vo.UserLoginVo;
import com.gyz.cfmall.vo.UserRegisterVo;
import com.gyz.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author gong_yz
 * @Description
 * @Date 2023/4/6
 */
@FeignClient("cfmall-member")
public interface MemberFeignService {

    /**
     * 远程调用用户注册
     * @param vo
     * @return
     */
    @PostMapping(value = "/member/member/register")
    R register(@RequestBody UserRegisterVo vo);

    /**
     * 远程调用用户登录
     * @param userLoginVo
     * @return
     */
    @PostMapping(value = "/member/member/login")
    R login(@RequestBody UserLoginVo userLoginVo);

    /**
     * 社交登录
     * @param socialUser
     * @return
     * @throws Exception
     */
    @PostMapping(value = "/member/member/oauth2/login")
    R oauthLogin(@RequestBody SocialUser socialUser) throws Exception;

}
